Conversation
|
Why is this change necessary? |
|
If you use an old compiler which does not support C99 by default. |
|
I can't imagine what the problem is with the c89 compiler. If an error occurs in the original source, I would like to see the contents of that error. |
|
@polluks I can't reproduce this issue on Linux. Since you're trying to upstream a patch for MacPorts, I presume you're trying to add support for a Mac - but what kind? Please tell us your exact target platform, your toolset, and reproduction steps. @jca02266 I cannot reproduce this error, but there is another. Results: Patch: This patch fixes the compilation: Unit test results: |
|
@grepwood Well, try to use an old gcc2. I didn't make the patch, maybe MacPorts wants to support old compilers. |
|
K&Rスタイルでは変数宣言はブロックの先頭に書かなくてはならないとされており、今のコードは文法違反ですから、修正した方が良いと考えます。実際、修正前のソースをgcc-2.95.2 (Mac OS X 10.2)でコンパイルすると以下のエラーが出ました。 修正方法ですがPRは処理順序を変えているのが気になりました。下記を提案します。 |
|
I see, I finally understand the meaning of the original pull request proposal. I’ll go ahead and adopt the original patch as it is. Thank you for letting me know. |
See https://github.com/macports/macports-ports/blob/master/archivers/lha/files/c89.patch